import java.util.concurrent.locks.LockSupport;

public class ThreadDemo20 {
    public static void main(String[] args) throws InterruptedException {
        Object lock = new Object();
        Thread t1 = new Thread(() -> {
            Thread currThread = Thread.currentThread();
            System.out.println("线程中止状态：" + currThread.isInterrupted());
            LockSupport.park();
            System.out.println("线程中止状态：" + currThread.isInterrupted());
//            LockSupport.parkUntil(1000 + System.currentTimeMillis());
        });
        t1.start();
        Thread.sleep(1000);
        System.out.println("中止线程");
        t1.interrupt();
        LockSupport.unpark(t1);
    }
}